package com.aabte.design2.behavioral.command;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class CutCommand extends AbstractCommand {
    public CutCommand(Application app, Editor editor) {
        super(app, editor);
    }

    @Override
    public boolean execute() {
        saveBackup();
        getApp().setClipboard(getEditor().getSelection());
        getEditor().deleteSelection();
        return true;
    }
}
